-- GENERATED SPELL FOR [Lieutenant Drake] --


function spell0_17848(pUnit, Event) --@Exploding Shot,n/a--
pUnit:FullCastSpellOnTarget(33792,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17848', 6395, 1)
end

function spell1_17848(pUnit, Event) --@Frightening Shout,n/a--
pUnit:FullCastSpellOnTarget(33789,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17848', 6000, 1)
end

function spell2_17848(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17848', 10373, 1)
end

function spell3_17848(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(31911,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17848', 5000, 1)
end

function spell4_17848(pUnit, Event) --@Whirlwind,n/a--
pUnit:FullCastSpellOnTarget(31909,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17848', 4000, 1)
end

function spell5_17848(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(31910,pUnit)
pUnit:RegisterEvent('Sorts_17848', 796, 1)
end

function Sorts_17848(pUnit, Event)
local choix_sorts_17848 = math.random(0, 5)
if choix_sorts_17848 == 0 then
pUnit:RegisterEvent('spell0_17848', 1, 1)
end
if choix_sorts_17848 == 1 then
pUnit:RegisterEvent('spell1_17848', 1, 1)
end
if choix_sorts_17848 == 2 then
pUnit:RegisterEvent('spell2_17848', 1, 1)
end
if choix_sorts_17848 == 3 then
pUnit:RegisterEvent('spell3_17848', 1, 1)
end
if choix_sorts_17848 == 4 then
pUnit:RegisterEvent('spell4_17848', 1, 1)
end
if choix_sorts_17848 == 5 then
pUnit:RegisterEvent('spell5_17848', 1, 1)
end
end

function mob17848_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17848', math.random(1500, 3000), 1)
end

function mob17848_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17848_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17848_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17848, 1, 'mob17848_Action')
RegisterUnitEvent(17848, 2, 'mob17848_Leave')
RegisterUnitEvent(17848, 3, 'mob17848_Kill')
RegisterUnitEvent(17848, 4, 'mob17848_Die')
